home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / cdrtools-1.10 / MKNOD.hpux < prev    next >
Encoding:
Text File  |  2000-01-10  |  1.6 KB  |  53 lines

  1. #!/bin/sh
  2. ################################################################
  3. # make SCSI device files according to: man scsi_ctl
  4. #
  5. # Copyright (c) 1997 J. Schilling
  6. ################################################################
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2, or (at your option)
  10. # any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; see the file COPYING.  If not, write to
  19. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  20. ################################################################
  21.  
  22. mknod="echo mknod"
  23. mkdir="echo mkdir -p"
  24. chmod="echo chmod"
  25.  
  26. mknod="/usr/sbin/mknod"
  27. mkdir="mkdir -p"
  28. chmod="chmod"
  29.  
  30. scsi=/dev/scsi
  31. rscsi=/dev/rscsi
  32.  
  33. ${mkdir}  ${scsi}
  34. ${mkdir} ${rscsi}
  35.  
  36. bus=0
  37. target=0
  38. lun=0
  39.  
  40. for bus in 0 1 2 3 4 5 6 7; do
  41.     for target in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
  42.         for lun in 0 1 2 3 4 5 6 7; do
  43.             dev=c${bus}t${target}l${lun} 
  44.  
  45.             $mknod  ${scsi}/${dev} c 203 0x${bus}${target}${lun}00
  46.             $chmod 0600  ${scsi}/${dev}
  47.  
  48.             $mknod ${rscsi}/${dev} c 203 0x${bus}${target}${lun}02
  49.             $chmod 0600  ${rscsi}/${dev}
  50.         done
  51.     done
  52. done
  53.